
import os
import sys
from PlatformInfo import PlatformInfo
from mon_common import *
from xen_helper import *

metric_list = (
    'cpu_num',
    'cpu_model_name',
    'vt_support',
    'vmm_name',
    'vmm_version',
    'os_version',
    'mem_total',
    'disk_total',
    'disk_free'
)

class XenPlatformInfo(PlatformInfo):

    def get_vmm_name(self):
        return 'xen'

    def get_vmm_version(self):
        return get_xen_version()

    def get_mem_total(self):
        return xentop2list()['memtotal']

